import request from "@/utils/request";

// 注销列表
export function getSignoutList(query, data) {
  return request({
    url: "/physicalCard/card/withdraw/list",
    method: "post",
    data,
    params: query,
  });
}

// 注销
export function signOut(data) {
  return request({
    url: "/physicalCard/update/status",
    method: "post",
    data: data,
  });
}

// 查询卡编号列表
export function listInfo(query) {
  return request({
    url: "/customer/ic/list",
    method: "get",
    params: query,
  });
}

//  统计开卡人数以及总额
export function statisticsInfo(query) {
  return request({
    url: "/customer/ic/statisticsInfo",
    method: "get",
    params: query,
  });
}
//修改卡密码
export function updatepwd(data) {
  return request({
    url: "/customer/ic/resetpwd",
    method: "post",
    data: data,
  });
}

// 充值
export function updateRecharge(data) {
  return request({
    url: "/customer/ic/UpdateRechargeByAfter",
    method: "post",
    data: data,
  });
}

// 扣款
export function updateConsumption(data) {
  return request({
    url: "/customer/ic/updateconsumptionByAfter",
    method: "post",
    data: data,
  });
}

// 注销
export function updatecancellation(data) {
  return request({
    url: "/customer/ic/updatecancellation",
    method: "post",
    data: data,
  });
}

// 删除卡编号
export function delInfo(icCardno) {
  return request({
    url: "/customer/info/" + icCardno,
    method: "delete",
  });
}

// 导出卡编号
export function exportInfo(query) {
  return request({
    url: "/customer/info/export",
    method: "get",
    params: query,
  });
}

// 查询充值/消费记录列表
export function physicalCardBalanceList(query) {
  return request({
    url: "/physicalCardBalance/list",
    method: "get",
    params: query,
  });
}

// GET /physicalCardBalance/statistics 实体卡订单列表统计
export function physicalCardBalanceSatistics(query) {
  return request({
    url: "/physicalCardBalance/statistics",
    method: "get",
    params: query,
  });
}

// 导出充值/消费记录Excel表
export function physicalCardBalanceExport(query) {
  return request({
    url: "/physicalCardBalance/export",
    method: "get",
    params: query,
  });
}

// 实体卡列表
export function physicalCardList(query) {
  return request({
    url: "/physicalCard/list",
    method: "get",
    params: query,
  });
}

// 批量修改实体卡状态为 冻结、注销状态
export function physicalCardUpdateStatus(data) {
  return request({
    url: "/physicalCard/update/status",
    method: "post",
    data: data,
  });
}

// 查询单个卡信息
export function physicalCardGet(query) {
  return request({
    url: "/physicalCard/get",
    method: "get",
    params: query,
  });
}

// 新增实体卡、复制实体卡
export function physicalCardAdd(data) {
  return request({
    url: "/physicalCard/add",
    method: "post",
    data: data,
  });
}

// 获取卡号和秘钥
export function physicalCardCreateNo(query) {
  return request({
    url: "/physicalCard/createNo",
    method: "get",
    params: query,
  });
}

// 修改覆盖实体卡、不允许修改面额充值
export function physicalCardUpdate(data) {
  return request({
    url: "/physicalCard/update",
    method: "post",
    data: data,
  });
}

// 实体卡消费
export function physicalCardOrderConsumption(data) {
  return request({
    url: "/physicalCard/order/consumption",
    method: "post",
    data: data,
  });
}

//实体卡充值
export function physicalCardBalanceRecharge(data) {
  return request({
    url: "/physicalCardBalance/recharge",
    method: "post",
    data: data,
  });
}

// 员工列表
export function getStaffQuery(query) {
  return request({
    url: "/staff/query",
    method: "get",
    params: query,
  });
}

// 油枪列表
export function physicalCardOrderGetGun(query) {
  return request({
    url: "/physicalCard/order/getGun",
    method: "get",
    params: query,
  });
}

//git /physicalCardBalance/refund  实体卡退款接口
export function physicalCardBalanceRefund(query) {
  return request({
    url: "/physicalCardBalance/refund",
    method: "get",
    params: query,
  });
}
